{extend name='common@layout/seller' /}
{block name="left"}{include file='common/order_left'}{/block}
{block name="breadcrumb"}
<div class="ncsc-path"><i class="icon-desktop"></i>商家管理中心<i class="icon-angle-right"></i>订单物流<i class="icon-angle-right"></i>发货</div>
{/block}
{block name='content'}
<div class="tabmenu">
   {include file='common/submenu'}
</div>
  <div class="ncsc-form-default">
    <form method="post" action="/?s=seller/deliver_set/print_set" enctype="multipart/form-data" id="my_store_form">
      <dl class="setup">
        <dt>备注信息：</dt>
        <dd><textarea name="store_printdesc" cols="150" rows="3" class="textarea w400" id="store_printdesc"><?php echo $store_info['store_printdesc'];?></textarea>
          <p class="hint">打印备注信息将出现在打印订单的下方位置，用于注明店铺简介或发货、<br/>退换货相关规则等；<span class="orange">内容不要超过100字。</span></p>
        </dd>
      </dl>
      <dl class="setup">
        <dt>印章图片：</dt>
        <dd>
          <input type="hidden" name="store_stamp_old" value="<?php echo $store_info['store_stamp'];?>" />
          <div class="ncsc-upload-thumb watermark-pic">
          	<p>
          	<img alt="<?php echo $store_info['store_stamp'];?>" src="{:img_url($store_info['store_stamp'])}" nc_type="store_stamp" /></p> </div>
          <p>
            <input name="store_stamp" type="file"  hidefocus="true" nc_type="change_store_stamp"/>
          </p>
          <p class="hint">印章图片将出现在打印订单的右下角位置，请选择120x120px大小<br/>透明GIF/PNG格式图片上传作为您店铺的电子印章使用。
          </p>
        </dd>
      </dl>
      <div class="bottom">
          <label class="submit-border"><input type="submit" class="submit" value="提交" /></label>
       </div>
    </form>
  </div>

<script type="text/javascript">
$(function(){
	$('input[nc_type="change_store_stamp"]').change(function(){
		var src = getFullPath($(this)[0]);
		$('img[nc_type="store_stamp"]').attr('src', src);
	});
	$('#my_store_form').validate({
    	submitHandler:function(form){
    		ajaxpost('my_store_form', '', '', 'onerror')
    	},
		rules : {
    		store_printdesc: {
    			required: true,
    			rangelength:[0,100]
    	    },
        },
        messages : {
        	store_printdesc: {
        		required: '<i class="icon-exclamation-sign"></i>备注信息长度为1到100个字符之间',
		        rangelength:'备注信息长度为1到100个字符之间'
		    }
        }
    });
});
</script>
{/block}